package com.dungeon.game;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.dungeon.game.Constants.Character_action_code;
import com.dungeon.game.Constants.Class_code;
import com.dungeon.game.Constants.Equipment_type_code;
import com.dungeon.game.Constants.Trinket_type_code;

class Item_factory {
	Item make_item(Equipment_type_code e_code){
		Item i = null;
	    if (e_code==null){
	        return null;
	    } else if (e_code==Equipment_type_code.E_CHAINMAIL){
	        i = new I_E_Chainmail();
	    } else if (e_code==Equipment_type_code.E_BANDED_MAIL){
	    	i = new I_E_Banded_mail();
	    } else if (e_code==Equipment_type_code.E_TUNIC){
	    	i = new I_E_Tunic();
	    } else if (e_code==Equipment_type_code.E_CLOAK){
	    	i = new I_E_Cloak();
	    } else if (e_code==Equipment_type_code.E_WHITE_ROBE){
	    	i = new I_E_White_robe();
	    } else if (e_code==Equipment_type_code.E_LEATHER_CUIRASS){
	    	i = new I_E_Leather_cuirass();
	    } else if (e_code==Equipment_type_code.E_PLATE_MAIL){
	    	i = new I_E_Plate_mail();
	    } else if (e_code==Equipment_type_code.E_DWARVEN_CHAINMAIL){
	    	i = new I_E_Dwarven_chainmail();
	    } else if (e_code==Equipment_type_code.E_ARCHERS_DOUBLET){
	    	i = new I_E_Archers_doublet();
	    } else if (e_code==Equipment_type_code.E_LONGSWORD){
	    	i = new I_E_Longsword();
	    } else if (e_code==Equipment_type_code.E_STAFF){
	        i = new I_E_Staff();
	    } else if (e_code==Equipment_type_code.E_MACE){
	        i = new I_E_Mace();
	    } else if (e_code==Equipment_type_code.E_CLUB){
	        i = new I_E_Club();
	    } else if (e_code==Equipment_type_code.E_DAGGER){
	        i = new I_E_Dagger();
	    } else if (e_code==Equipment_type_code.E_SPEAR){
	        i = new I_E_Spear();
	    } else if (e_code==Equipment_type_code.E_ANTIQUE_SWORD){
	        i = new I_E_Antique_sword();
	    } else if (e_code==Equipment_type_code.E_RAPIER){
	        i = new I_E_Rapier();
	    } else if (e_code==Equipment_type_code.E_RELIQUARY){
	        i = new I_E_Reliquary();
	    } else if (e_code==Equipment_type_code.E_GNARLED_STAFF){
	        i = new I_E_Gnarled_staff();
	    } else if (e_code==Equipment_type_code.E_WARLOCK_SWORD){
	        i = new I_E_Warlock_sword();
	    } else if (e_code==Equipment_type_code.E_ELVEN_KNIFE){
	        i = new I_E_Elven_knife();
	    } else if (e_code==Equipment_type_code.E_ASSASSINS_BLADE){
	        i = new I_E_Assassins_blade();
	    } else if (e_code==Equipment_type_code.E_FLAIL){
	        i = new I_E_Flail();
	    } else if (e_code==Equipment_type_code.E_GREATSWORD){
	        i = new I_E_Greatsword();
	    } else if (e_code==Equipment_type_code.E_AXE){
	        i = new I_E_Axe();
	    } else if (e_code==Equipment_type_code.E_CHAMPIONS_SWORD){
	        i = new I_E_Champions_sword();
	    } else if (e_code==Equipment_type_code.E_DRAINING_SWORD){
	        i = new I_E_Draining_sword();
	    } else if (e_code==Equipment_type_code.E_FLAMING_SWORD){
	        i = new I_E_Flaming_sword();
	    } else if (e_code==Equipment_type_code.E_MACE_OF_CHASTISEMENT){
	        i = new I_E_Mace_of_chastisement();
	    } else if (e_code==Equipment_type_code.E_DRAGONS_BANE){
	        i = new I_E_Dragons_bane();
	    } else if (e_code==Equipment_type_code.E_SHORTBOW){
	        i = new I_E_Shortbow();
	    } else if (e_code==Equipment_type_code.E_LONGBOW){
	        i = new I_E_Longbow();
	    } else if (e_code==Equipment_type_code.E_SLING){
	        i = new I_E_Sling();
	    } else if (e_code==Equipment_type_code.E_MAGIC_SLING){
		    i = new I_E_Magic_sling();
	    } else if (e_code==Equipment_type_code.E_CROSSBOW){
	        i = new I_E_Crossbow();
	    } else if (e_code==Equipment_type_code.E_JAVELINS){
	        i = new I_E_Javelins();
	    } else if (e_code==Equipment_type_code.E_ELVEN_BOW){
	        i = new I_E_Elven_bow();
	    } else if (e_code==Equipment_type_code.E_GNOMISH_CROSSBOW){
	        i = new I_E_Gnomish_crossbow();
	    } else if (e_code==Equipment_type_code.E_PRENTICE_WAND){
	        i = new I_E_Prentice_wand();
	    } else if (e_code==Equipment_type_code.E_ALDER_WAND){
	        i = new I_E_Alder_wand();
	    } else if (e_code==Equipment_type_code.E_WILLOW_WAND){
	        i = new I_E_Willow_wand();
	    } else if (e_code==Equipment_type_code.E_HAZEL_WAND){
	        i = new I_E_Hazel_wand();
	    } else if (e_code==Equipment_type_code.E_YEW_WAND){
	        i = new I_E_Yew_wand();
	    } else if (e_code==Equipment_type_code.E_FLINT_WAND){
	        i = new I_E_Flint_wand();
	    } else if (e_code==Equipment_type_code.E_SHIELD){
	        i = new I_E_Shield();
	    } else if (e_code==Equipment_type_code.E_BUCKLER){
	        i = new I_E_Buckler();
	    } else if (e_code==Equipment_type_code.E_DWARVEN_SHIELD){
	        i = new I_E_Dwarven_shield();
	    } else if (e_code==Equipment_type_code.E_BLAZONED_SHIELD){
	        i = new I_E_Blazoned_shield();
	    } else if (e_code==Equipment_type_code.E_TOWER_SHIELD){
	        i = new I_E_Tower_shield();
	    } else if (e_code==Equipment_type_code.E_DIRK){
	        i = new I_E_Dirk();
	    } else if (e_code==Equipment_type_code.E_MAIN_GAUCHE){
	        i = new I_E_Main_gauche();
	    } else if (e_code==Equipment_type_code.E_PLUMED_HELM){
	        i = new I_E_Plumed_helm();
	    } else if (e_code==Equipment_type_code.E_HOODED_CLOAK){
	        i = new I_E_Hooded_cloak();
	    } else if (e_code==Equipment_type_code.E_VISORED_HELM){
	        i = new I_E_Visored_helm();
	    } else if (e_code==Equipment_type_code.E_CHAIN_UNDERVEST){
	        i = new I_E_Chain_undervest();
	    } else if (e_code==Equipment_type_code.E_HUNTERS_SASH){
	        i = new I_E_Hunters_sash();
	    } else if (e_code==Equipment_type_code.E_ELVEN_ARROWS){
	        i = new I_E_Elven_arrows();
	    } else if (e_code==Equipment_type_code.E_POISON_ARROWS){
	        i = new I_E_Poison_arrows();
	    } else if (e_code==Equipment_type_code.E_DUELLISTS_BRACERS){
	        i = new I_E_Duellists_bracers();
	    } else if (e_code==Equipment_type_code.E_BRACERS_OF_DEFENSE){
	        i = new I_E_Bracers_of_defense();
	    } else if (e_code==Equipment_type_code.E_UNICORN_HORN){
	        i = new I_E_Unicorn_horn();
	    } else if (e_code==Equipment_type_code.E_TREASURE_MAP){
	        i = new I_E_Treasure_map();
	    } else if (e_code==Equipment_type_code.E_BELT_OF_SCALPS){
	        i = new I_E_Belt_of_scalps();
	    } else if (e_code==Equipment_type_code.E_ELVEN_BOOTS){
	        i = new I_E_Elven_boots();
	    } else if (e_code==Equipment_type_code.E_FLASK_OF_ELIXIR){
	        i = new I_E_Flask_of_elixir();
	    } else if (e_code==Equipment_type_code.E_GUERDON){
	        i = new I_E_Guerdon();
	    } else if (e_code==Equipment_type_code.E_MIRRORED_HELM){
	        i = new I_E_Mirrored_helm();
	    } else if (e_code==Equipment_type_code.E_MIRRORED_SHIELD){
	        i = new I_E_Mirrored_shield();
	    } else if (e_code==Equipment_type_code.E_MACE_OF_DISRUPTION){
	        i = new I_E_Mace_of_disruption();
	    } else if (e_code==Equipment_type_code.E_MAUL){
	        i = new I_E_Maul();
	    } else if (e_code==Equipment_type_code.E_WAR_STAFF){
	        i = new I_E_War_Staff();
	    } else if (e_code==Equipment_type_code.E_WHIP){
	        i = new I_E_Whip();
	    } else if (e_code==Equipment_type_code.E_GUILDMASTER_ROBE){
	        i = new I_E_Guildmaster_Robe();
	    } else if (e_code==Equipment_type_code.E_RING_OF_FREE_ACTION){
	        i = new I_E_Ring_of_free_action();
	    } else if (e_code==Equipment_type_code.E_RED_ROBE){
	        i = new I_E_Red_robe();
	    } else if (e_code==Equipment_type_code.E_BLUE_ROBE){
	        i = new I_E_Blue_robe();
	    } else if (e_code==Equipment_type_code.E_ELVEN_CHAIN){
	        i = new I_E_Elven_chainmail();
	    } else if (e_code==Equipment_type_code.E_ELVEN_CLOAK){
	        i = new I_E_Elven_cloak();
	    } else if (e_code==Equipment_type_code.E_MAGIC_CLOAK){
	        i = new I_E_Magic_cloak();
	    } else if (e_code==Equipment_type_code.E_HERO_PLATE){
	        i = new I_E_Hero_plate();
	    } else if (e_code==Equipment_type_code.E_GREAT_AXE){
	        i = new I_E_Berserker_axe();
	    } else if (e_code==Equipment_type_code.E_GUISARME){
	        i = new I_E_Guisarme();
	    } else if (e_code==Equipment_type_code.E_HALBERD){
	        i = new I_E_Halberd();
	    } else if (e_code==Equipment_type_code.E_GREAT_HAMMER){
	        i = new I_E_Great_hammer();
	    } else if (e_code==Equipment_type_code.E_CUTLASS){
	        i = new I_E_Rogue_sword();
	    } else if (e_code==Equipment_type_code.E_JEWELED_STAFF){
	        i = new I_E_Staff_of_vitality();
	    } else if (e_code==Equipment_type_code.E_RED_STAFF){
	        i = new I_E_Staff_of_pyromancy();
	    } else if (e_code==Equipment_type_code.E_FORKED_WAND){
	        i = new I_E_Wand_of_prestidigitation();
	    } else if (e_code==Equipment_type_code.E_ORBED_WAND){
	        i = new I_E_Wand_of_destruction();
	    } else if (e_code==Equipment_type_code.E_GILT_WAND){
	        i = new I_E_Wand_of_interdiction();
	    } else if (e_code==Equipment_type_code.E_DRAGON_HORN_BOW){
	        i = new I_E_Dragon_horn_bow();
	    } else if (e_code==Equipment_type_code.E_UNSEELIE_BOW){
	        i = new I_E_Unseelie_bow();
	    }  else if (e_code==Equipment_type_code.E_GLOWING_PHIAL){
	        i = new I_E_Glowing_phial();
		} else if (e_code==Equipment_type_code.E_CURSE_SKULL){
	        i = new I_E_Curse_skull();
		} else if (e_code==Equipment_type_code.E_SHINING_ICON){
			i = new I_E_Shining_icon();
		} else if (e_code==Equipment_type_code.E_HOLY_WATER_SPRINKLER){
			i = new I_E_Holy_water_sprinkler();
		} else if (e_code==Equipment_type_code.E_LUCKY_CHARM){
	        i = new I_E_Lucky_charm();
		} else if (e_code==Equipment_type_code.E_PAN_PIPE){
	        i = new I_E_Pan_pipe();
		} else if (e_code==Equipment_type_code.E_PEARL_AMULET){
			i = new I_E_Pearl_amulet();
		} else if (e_code==Equipment_type_code.E_POTION_BELT){
			i = new I_E_Potion_belt();
		} else if (e_code==Equipment_type_code.E_GAUNTLETS_OF_POWER){
			i = new I_E_Gauntlets_of_power(); // +1 strength
		} else if (e_code==Equipment_type_code.E_AMULET_OF_WARDING){
			i = new I_E_Amulet_of_warding(); // Reveal Danger
		} else if (e_code==Equipment_type_code.E_WIZARDS_HAT){
			i = new I_E_Wizards_hat(); //+1 subtlety, hat slot
		} else if (e_code==Equipment_type_code.E_BANDANNA){
			i = new I_E_Bandanna(); // +1 daring, hat slot
		} else if (e_code==Equipment_type_code.E_CRUSADERS_CAP){
			i = new I_E_Crusaders_Cape(); // +1 valor, cloak slot
		} else if (e_code==Equipment_type_code.E_PROTECTIVE_TALISMAN){
			i = new I_E_Protective_talisman(); // Lucky Escape
		} else if (e_code==Equipment_type_code.E_BOOK_OF_EXORCISM){
			i = new I_E_Book_of_exorcism();
		} else if (e_code==Equipment_type_code.E_BOOK_OF_PRAISE){
			i = new I_E_Book_of_praise();
		} else if (e_code==Equipment_type_code.E_DWARVEN_HAMMER){
			i = new I_E_Dwarven_hammer();
		} else if (e_code==Equipment_type_code.E_CHALICE){
			i = new I_E_Chalice();
		} else if (e_code==Equipment_type_code.E_DARK_BISHOP_MACE){
			i = new I_E_Dark_bishop_mace();
		} else if (e_code==Equipment_type_code.E_MAGIC_CARPET){
			i = new I_E_Magic_carpet();
		} else if (e_code==Equipment_type_code.E_DARK_ELF_SWORD_RIGHT){
			i = new I_E_Dark_elf_sword_right();
		} else if (e_code==Equipment_type_code.E_DARK_ELF_SWORD_LEFT){
			i = new I_E_Dark_elf_sword_left();
		} else if (e_code==Equipment_type_code.E_WRAITH_CLOAK){
			i = new I_E_Wraith_cloak();
		} else if (e_code==Equipment_type_code.E_TEMPLAR_PLATE){
			i = new I_E_Templar_plate();
		} else if (e_code==Equipment_type_code.E_HOSPITALLER_PLATE){
			i = new I_E_Hospitaller_plate();
		} else if (e_code==Equipment_type_code.E_HEALER_ROBE){
			i = new I_E_Healer_robe();
		} else if (e_code==Equipment_type_code.E_WHITE_STAFF){
			i = new I_E_White_staff();
		} else if (e_code==Equipment_type_code.E_MEDUSA_GIRDLE){
			i = new I_E_Medusa_girdle();
		} else if (e_code==Equipment_type_code.E_CLOAK_CONCEALMENT){
			i = new I_E_Cloak_concealment();
		} else if (e_code==Equipment_type_code.E_FAMILIAR_CAT){
			i = new I_E_Familiar_cat();
		} else if (e_code==Equipment_type_code.E_FAMILIAR_RAVEN){
			i = new I_E_Familiar_raven();
		} else if (e_code==Equipment_type_code.E_FAMILIAR_IMP){
			i = new I_E_Familiar_imp();
		} else if (e_code==Equipment_type_code.E_FAMILIAR_GOLD_DRAGON){
			i = new I_E_Familiar_gold_dragon();
		} else if (e_code==Equipment_type_code.E_FAMILIAR_WHITE_DRAGON){
			i = new I_E_Familiar_white_dragon();
		} else if (e_code==Equipment_type_code.E_HOLY_SYMBOL_1){
			i = new I_E_Holy_symbol_1();
		} else if (e_code==Equipment_type_code.E_HOLY_SYMBOL_2){
			i = new I_E_Holy_symbol_2();
		} else if (e_code==Equipment_type_code.E_MAGE_KNIFE){
			i = new I_E_Mage_knife();
		} else if (e_code==Equipment_type_code.E_KRILL){
			i = new I_E_Krill();
		} else if (e_code==Equipment_type_code.E_SHIELD_DEFENSE){
			i = new I_E_Shield_defense();
		}
	    if (i!=null){
	    	i.image = e_code.get_image();
	    }
	    return i;
	}
}

class Item implements Serializable{
	private static final long serialVersionUID = -1626561108955325193L;

	String name(){
        return "";
    }

    String image;

    int aggro(){
        return 0;
    }

    int evasion(){
        return 0;
    }

    int armor(){
        return 0;
    }

    int base_damage_dice(){
        return 0;
    }

    int base_damage_sides(){
        return 0;
    }

    int damage(){
        return 0;
    }

    int penetration(){
        return 0;
    }

    int accuracy(){
        return 0;
    }

    int speed(){
        return 0;
    }

    int aim(){
        return 0;
    }

    int rapidity(){
        return 0;
    }

    boolean is_melee_weapon(){
        return false;
    }

    boolean is_armor(){
        return false;
    }

    boolean is_missile_weapon(){
        return false;
    }

    boolean is_offhand(){
        return false;
    }

    boolean is_trinket(){
        return false;
    }

    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_PRIEST,Class_code.C_MAGE);
    }

    boolean has_stat_requirement(){
        return (requires_strength()!=null || requires_valor()!=null || requires_skill()!=null || requires_daring()!=null || requires_subtlety()!=null || requires_power()!=null || requires_cunning()!=null || requires_wisdom()!=null);
    }

    Integer requires_wisdom(){
        return null;
    }

    Integer requires_cunning(){
        return null;
    }

    Integer requires_strength(){
        return null;
    }

    Integer requires_valor(){
        return null;
    }

    Integer requires_skill(){
        return null;
    }

    Integer requires_daring(){
        return null;
    }

    Integer requires_subtlety(){
        return null;
    }

    Integer requires_power(){
        return null;
    }

    int strength(){
        return 0;
    }

    int skill(){
        return 0;
    }

    int valor(){
        return 0;
    }

    int wisdom(){
        return 0;
    }

    int daring(){
        return 0;
    }

    int cunning(){
        return 0;
    }

    int power(){
        return 0;
    }

    int subtlety(){
        return 0;
    }

    int stamina(){
        return 0;
    }

    int constitution(){
        return 0;
    }

    int reflexes(){
        return 0;
    }

    List<Character_action_code> action_codes(){
        return new ArrayList<Character_action_code>();
    }

    boolean poison_melee(){
        return false;
    }

    boolean fire_melee(){
        return false;
    }

    boolean poison_missile(){
        return false;
    }

    boolean fire_missile(){
        return false;
    }

    boolean dragon_slaying_melee(){
        return false;
    }

    boolean undead_slaying_melee(){
        return false;
    }

    boolean magebane_missile(){
        return false;
    }

    boolean lose_health(){
		return false;
	}

    boolean two_handed(){
        return false;
    }

    Trinket_type_code trinket_type(){
        return null;
    }

    String hit_sound(){
    	return "";
    }

    String miss_sound(){
    	return "";
    }

    Integer cost(){
    	return 99999;}

    String main_function(){
		String s = "";
		if (base_damage_dice()!=0) s = s + "Base damage " + base_damage_dice() + "d" + base_damage_sides() + ", ";
		if (armor()>0) s = s + "Armor " + armor() + ", ";
		if (evasion()>0) s = s + "Evasion +" + evasion() + ", ";
		if (aggro()!=0) s = s + "Aggro " + aggro() + ", ";
		if (damage()>0) s = s + "Base melee damage +" + 10*damage() + "%, ";
		if (penetration()>0) s = s + "Base missile damage +" + 10*penetration() + "%, ";
		if (accuracy()>0) s = s + "Melee accuracy +" + accuracy() + ", ";
		if (speed()>0) s = s + "Melee speed +" + speed() + ", ";
		if (aim()>0) s = s + "Missile aim +" + aim() + ", ";
		if (rapidity()>0) s = s + "Missile rapidity +" + rapidity() + ", ";
		if (strength()>0) s = s + "Strength +" + strength() + ", ";
		if (skill()>0) s = s + "Skill +" + skill() + ", ";
		if (valor()>0) s = s + "Valor +" + valor() + ", ";
		if (wisdom()>0) s = s + "Wisdom +" + wisdom() + ", ";
		if (daring()>0) s = s + "Daring +" + daring() + ", ";
		if (cunning()>0) s = s + "Cunning +" + cunning() + ", ";
		if (power()>0) s = s + "Power +" + power() + ", ";
		if (subtlety()>0) s = s + "Subtlety +" + subtlety() + ", ";
		if (stamina()>0) s = s + "Energy +" + stamina() + ", ";
		if (constitution()>0) s = s + "Constitution +" + constitution() + ", ";
		if (reflexes()>0) s = s + "Reflexes +" + reflexes() + ", ";
		if (dragon_slaying_melee()) s = s + "double base damage against dragons, ";
		if (undead_slaying_melee()) s = s + "double base damage against undead, ";
		if (magebane_missile()) s = s + "pierces protective spells, ";
		if (s.length()>0)
			return s.substring(0, s.length() - 2)+".";
		else
			return "";
    }

    String disadvantages(){
		String s = "";
		if (armor()<0) s = s + "Armor " + armor() + ", ";
		if (evasion()<0) s = s + "Evasion " + evasion() + ", ";
		if (damage()<0) s = s + "Base melee damage +" + 10*damage() + "%, ";
		if (penetration()<0) s = s + "Base missile damage +" + 10*penetration() + "%, ";
		if (accuracy()<0) s = s + "Melee accuracy " + accuracy() + ", ";
		if (speed()<0) s = s + "Melee speed " + speed() + ", ";
		if (aim()<0) s = s + "Missile aim " + aim() + ", ";
		if (rapidity()<0) s = s + "Missile rapidity " + rapidity() + ", ";
		if (strength()<0) s = s + "Strength " + strength() + ", ";
		if (skill()<0) s = s + "Skill " + skill() + ", ";
		if (valor()<0) s = s + "Valor " + valor() + ", ";
		if (wisdom()<0) s = s + "Wisdom " + wisdom() + ", ";
		if (daring()<0) s = s + "Daring " + daring() + ", ";
		if (cunning()<0) s = s + "Cunning " + cunning() + ", ";
		if (power()<0) s = s + "Power " + power() + ", ";
		if (subtlety()<0) s = s + "Subtlety " + subtlety() + ", ";
		if (stamina()<0) s = s + "Energy " + stamina() + ", ";
		if (constitution()<0) s = s + "Constitution " + constitution() + ", ";
		if (reflexes()<0) s = s + "Reflexes " + reflexes() + ", ";
		if (poison_melee() || poison_missile()) s = s + "less effective against enemies that resist poison. ";
		if (fire_melee() || fire_missile()) s = s + "less effective against enemies that resist fire. ";
		if (s.length()>0)
			return s.substring(0, s.length() - 2)+".";
		else
			return "";
    }

    String other_comments(){
		String s = "";
		if (two_handed()) s = s + "It is a two-handed weapon. ";
		if (s.length()>0)
			return s.substring(0, s.length() - 2)+".";
		else
			return "";
    }

    String description(){
    	if (disadvantages().length()>0)
    		return main_function() + " But " + disadvantages() + " " + other_comments();
    	else
    		return main_function() + " " + other_comments();
    }

    boolean takes_arrows(){
        return false;
    }

    boolean takes_bolts(){
        return false;
    }

    boolean takes_stones(){
        return false;
    }
}

class Body_armor extends Item {
	private static final long serialVersionUID = 3569738019963658955L;

	boolean is_armor(){
        return true;
    }
 }

class Melee_weapon extends Item {
	private static final long serialVersionUID = -3263044782475340360L;

	boolean is_melee_weapon(){
        return true;
    }

    String hit_sound(){
    	return "hit";
    }

    String miss_sound(){
    	return "miss";
    }
}

class Shooter extends Item {
    private static final long serialVersionUID = 4278937296483361505L;

	boolean is_missile_weapon(){
        return true;
    }

    String hit_sound(){
    	return "shoot";
    }

    String miss_sound(){
    	return "miss";
    }

    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR, Class_code.C_ROGUE);
    }
}

class Wand extends Item {
    private static final long serialVersionUID = -2768199286237011812L;

	boolean is_missile_weapon(){
        return true;
    }

    String hit_sound(){
    	return "zap";
    }

    String miss_sound(){
    	return "miss";
    }

    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);
    }
}

class Shield extends Item {
    private static final long serialVersionUID = -4792825100690530627L;

	boolean is_offhand(){
        return true;
    }

    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST);
    }
}

class Offhand_weapon extends Shield {
    private static final long serialVersionUID = 8915563804626695892L;

	List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE);
    }
}

class Heavy_armor extends Body_armor {
    private static final long serialVersionUID = -3337383529128238429L;

	List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST);
    }
}

class Big_sharp_weapon extends Melee_weapon {
    private static final long serialVersionUID = 2179193945657498689L;

	List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE);
    }
}

class Two_handed_sharp_weapon extends Big_sharp_weapon {
    private static final long serialVersionUID = 8702620696512829919L;

	boolean two_handed(){
        return true;
    }

    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR);
    }
}

class Big_blunt_weapon extends Melee_weapon {
    private static final long serialVersionUID = 5078767644685181299L;

	List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_PRIEST);
    }
}

class Two_handed_blunt_weapon extends Big_blunt_weapon {
    private static final long serialVersionUID = -1463094216879211719L;

	boolean two_handed(){
        return true;
    }
}

class Trinket extends Item {
    private static final long serialVersionUID = -1204280548072387159L;

	boolean is_trinket(){
        return true;
    }
}

class I_E_Chainmail extends Heavy_armor {
	private static final long serialVersionUID = -8048806615233148964L;
	String name(){
        return "Chainmail";}
    int armor(){
        return 4;}
    int evasion(){
        return -1;}
    int speed(){
        return -1;}
    Integer requires_strength(){
        return 3;}
    Integer requires_valor(){
        return 3;}
    Integer cost(){
    	return 100;}
}

class I_E_Dwarven_chainmail extends Heavy_armor {
	private static final long serialVersionUID = -6779476698219376112L;
	String name(){
        return "Dwarven chainmail";}
    int armor(){
        return 4;}
    int speed(){
        return -1;}
    int constitution(){
        return 1;}
    Integer requires_strength(){
        return 3;}
    Integer requires_valor(){
        return 3;}
}

class I_E_Elven_chainmail extends Heavy_armor {
	private static final long serialVersionUID = 518058148988687971L;
	String name(){
        return "Elven chainmail";}
    int armor(){
        return 4;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_PRIEST,Class_code.C_MAGE);}
}

class I_E_Banded_mail extends Heavy_armor {
	private static final long serialVersionUID = -6163737786555790644L;
	String name(){
        return "Banded mail";}
    int armor(){
        return 5;}
    int evasion(){
        return -2;}
    int speed(){
        return -1;}
    Integer requires_strength(){
        return 4;}
    Integer requires_valor(){
        return 4;}
    Integer cost(){
    	return 200;}
}

class I_E_Plate_mail extends Heavy_armor {
	private static final long serialVersionUID = -6276279221514808465L;
	String name(){
        return "Plate mail";}
    int armor(){
        return 6;}
    int evasion(){
        return -2;}
    int speed(){
        return -1;}
    Integer requires_strength(){
    	return 4;}
    Integer requires_valor(){
    	return 4;}
    int aggro(){
    	return 1;}
    Integer cost(){
    	return 300;}
}

class I_E_Templar_plate extends Heavy_armor {
	private static final long serialVersionUID = 5351241587041535221L;
	String name(){
        return "Templar Plate";}
    int armor(){
        return 7;}
    int evasion(){
        return -3;}
    Integer requires_valor(){
    	return 4;}
    int aggro(){
    	return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_GUIDANCE,Character_action_code.CA_RESIST_FEAR,Character_action_code.CA_STUN_RESISTANCE);}
    String other_comments(){
		return "It gives you the Guidance ability, which increases your accuracy, and also protects you from fear and stunning.";}
}

class I_E_Hospitaller_plate extends Heavy_armor {
	private static final long serialVersionUID = 5351241587041535221L;
	String name(){
        return "Hospitaller Plate";}
    int armor(){
        return 7;}
    int evasion(){
        return -2;}
    int speed(){
        return -1;}
    Integer requires_valor(){
    	return 4;}
    int aggro(){
    	return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_SMALL_HEAL,Character_action_code.CA_CURE_POISON,Character_action_code.CA_CURE_MORTAL_WOUNDS);}
    String other_comments(){
		return "It gives you the Smaller Heal, Cure Poison and Revive spells.";}
}

class I_E_Hero_plate extends Heavy_armor {
	private static final long serialVersionUID = 3838275816100005963L;
	String name(){
        return "Heroic plate mail";}
    int armor(){
        return 8;}
    int evasion(){
        return -2;}
    Integer requires_strength(){
    	return 5;}
    Integer requires_skill(){
    	return 5;}
    int aggro(){
    	return 2;}
    Integer cost(){
    	return 99999;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_LEADER,Character_action_code.CA_RESIST_FEAR,Character_action_code.CA_LIGHT);}
    String other_comments(){
		return "It gives you the 'Leader' skill, for +1 melee speed if you are in the middle of the front row. It also protects you from fear, and casts a light through magical darkness.";}
}

class I_E_Cloak extends Body_armor {
	private static final long serialVersionUID = -2629516836475964823L;
	String name(){
        return "Cloak";}
    int evasion(){
        return 2;}
    Integer cost(){
    	return 10;}
}

class I_E_Wraith_cloak extends Body_armor {
	private static final long serialVersionUID = 2871123223063145878L;
	String name(){
        return "Oathwraith's Cloak";}
    int evasion(){
        return 1;}
    int aggro(){
        return 1;}
    int damage(){
        return 2;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_FIND_WEAKNESS,Character_action_code.CA_WATCHFUL,Character_action_code.CA_TIRELESS);}
    String other_comments(){
		return "It lends your blows a deadly force, and it also makes you unsleeping.";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE);}
}

class I_E_Elven_cloak extends Body_armor {
	private static final long serialVersionUID = 3464441679427593125L;
	String name(){
        return "Elven cloak";}
    int evasion(){
        return 3;}
    int aggro(){
        return -1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_STEALTH);}
    String other_comments(){
		return "It lets you sneak through the dungeon without being noticed.";}
}

class I_E_Magic_cloak extends Body_armor {
	private static final long serialVersionUID = 7896866152632633024L;
	String name(){
        return "Magic cloak";}
    int evasion(){
        return 3;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_FREE_ACTION,Character_action_code.CA_COLD_RESISTANCE);}
    String other_comments(){
		return "It protects you from paralysis attacks, and also halves the damage you take from cold attacks.";}
}

class I_E_Tunic extends Body_armor {
	private static final long serialVersionUID = -4765193661397535248L;
	String name(){
        return "Tunic";}
    int armor(){
        return 1;}
    Integer cost(){
    	return 5;}
}

class I_E_Archers_doublet extends Body_armor {
	private static final long serialVersionUID = -1683074469107741896L;
	String name(){
        return "Archer's doublet";}
    int evasion(){
        return 2;}
    int aim(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE);}
}

class I_E_Leather_cuirass extends Body_armor {
	private static final long serialVersionUID = -6525411053351983982L;
	String name(){
        return "Leather jerkin";}
    int armor(){
        return 2;}
    int evasion(){
        return -1;}
    Integer cost(){
    	return 20;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_PRIEST);}
}

class I_E_White_robe extends Body_armor {
	private static final long serialVersionUID = 5578415317026626454L;
	String name(){
        return "White Robe";}
    int armor(){
        return 1;}
    int stamina(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST,Class_code.C_MAGE);}
    Integer cost(){
    	return 100;}
}

class I_E_Healer_robe extends Body_armor {
	private static final long serialVersionUID = 9139506055549847946L;
	String name(){
        return "Healer Robe";}
    int armor(){
        return 1;}
    int constitution(){
        return 1;}
    int wisdom(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_WATCHFUL,Character_action_code.CA_APOTHECARY);}
    String other_comments(){
		return "It makes you resistant to sleep, and also gives you the Apothecary skill, allowing you to carry four potions instead of three.";}
}

class I_E_Guildmaster_Robe extends Body_armor {
	private static final long serialVersionUID = 6198345144079543022L;
	String name(){
        return "Guild Master's Robe";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    int armor(){
        return 1;}
    int evasion(){
        return -2;}
    int subtlety(){
    	return 1;}
    int power(){
    	return 1;}
    int aggro(){
    	return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_BUFF_EV,Character_action_code.CA_ESCAPE,Character_action_code.CA_REFLECTION,Character_action_code.CA_FIRE_RESISTANCE,Character_action_code.CA_COLD_RESISTANCE);}
    String other_comments(){
		return "It allows you to cast the Warding, Reflection and Word of Recall spells. It also makes you resistant to fire and cold.";}
}


class I_E_Red_robe extends Body_armor {
	private static final long serialVersionUID = 152181454711430046L;
	String name(){
        return "Red Robe";}
    int armor(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    int power(){
    	return 1;}
    int penetration(){
    	return 2;}
    int aggro(){
    	return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_FIRE_RESISTANCE);}
    String other_comments(){
		return "It makes you resistant to fire.";}
}

class I_E_Blue_robe extends Body_armor {
	private static final long serialVersionUID = 3359011350288417477L;
	String name(){
        return "Blue Robe";}
    int armor(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    int evasion(){
    	return 2;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_CONCENTRATION,Character_action_code.CA_RESIST_FEAR,Character_action_code.CA_WATCHFUL);}
    String other_comments(){
		return "It makes you resistant to fear and sleep. It also gives you the 'Concentration' skill, which means that taking moderate amounts of damage does not disrupt your spells.";}
}

class I_E_Longsword extends Big_sharp_weapon {
	private static final long serialVersionUID = 5010399845581121386L;
	String name(){
        return "Longsword";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 6;}
    int speed(){
        return 2;}
    Integer requires_skill(){
        return 3;}
    Integer requires_daring(){
        return 3;}
    Integer cost(){
    	return 50;}
}

class I_E_Flail extends Two_handed_blunt_weapon {
	private static final long serialVersionUID = 2401487064910893256L;
	String name(){
        return "Flail";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 12;}
    Integer requires_strength(){
        return 4;}
    Integer requires_valor(){
        return 4;}
    Integer cost(){
    	return 50;}
}

class I_E_Great_hammer extends Two_handed_blunt_weapon {
	private static final long serialVersionUID = -4307849133679664418L;
	String name(){
        return "Great Hammer";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 17;}
    int speed(){
        return -3;}
    int accuracy(){
        return -1;}
    Integer requires_strength(){
        return 5;}
    Integer requires_valor(){
        return 5;}
}

class I_E_Greatsword extends Two_handed_sharp_weapon {
	private static final long serialVersionUID = 8207811451788334881L;
    String name(){
        return "Greatsword";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 7;}
    int speed(){
        return 2;}
    int accuracy(){
        return 1;}
    Integer requires_strength(){
        return 4;}
    Integer cost(){
    	return 100;}
}

class I_E_Axe extends Big_sharp_weapon {
	private static final long serialVersionUID = -6055821351088593288L;
	String name(){
        return "Axe";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 7;}
    Integer cost(){
    	return 30;}
}

class I_E_Antique_sword extends Big_sharp_weapon {
	private static final long serialVersionUID = -4058279080715629942L;
	String name(){
        return "Antique sword";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 6;}
    int speed(){
        return 1;}
    int accuracy(){
        return 2;}
    Integer requires_skill(){
        return 4;}
    Integer requires_daring(){
        return 4;}
}

class I_E_Berserker_axe extends Two_handed_sharp_weapon {
	private static final long serialVersionUID = -7981908361775085775L;
	String name(){
        return "Berserker Axe";}
    int base_damage_dice(){
        return 4;}
    int base_damage_sides(){
        return 7;}
    Integer requires_strength(){
        return 6;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RAGE,Character_action_code.CA_BERSERK);}
    String other_comments(){
		return "It gives you the 'Rage' skill, which means you gain energy when you get hit. It also allows you to go berserk. It is a two-handed weapon.";
    }
}

class I_E_Guisarme extends Two_handed_sharp_weapon {
    private static final long serialVersionUID = 5403066009989056100L;
	String name(){
        return "Guisarme";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 6;}
    Integer requires_strength(){
        return 4;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_POLEARM_STRIKE);}
    String other_comments(){
		return "It allows you to attack enemies when you are standing in the back row. It is a two-handed weapon.";}
    Integer cost(){
    	return 50;}
}

class I_E_Halberd extends Two_handed_sharp_weapon {
    private static final long serialVersionUID = -7244867037803430621L;
	String name(){
        return "Antique halberd";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 8;}
    int accuracy(){
        return 1;}
    Integer requires_strength(){
        return 5;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_POLEARM_STRIKE,Character_action_code.CA_CLEAVE);}
    String other_comments(){
		return "It allows you to attack enemies when you are standing in the back row. It also gives you the 'Cleave' ability. It is a two-handed weapon.";}
}

class I_E_Rapier extends Big_sharp_weapon {
    private static final long serialVersionUID = -7120087653597535262L;
	String name(){
        return "Rapier";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 4;}
    int speed(){
        return 2;}
    int evasion(){
        return 2;}
    Integer requires_daring(){
        return 4;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_ROGUE);}
    Integer cost(){
    	return 100;}
}

class I_E_Rogue_sword extends Big_sharp_weapon {
    private static final long serialVersionUID = 5256556460081380738L;
	String name(){
        return "Khardassian Blade";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 6;}
    int speed(){
        return 1;}
    int evasion(){
        return 1;}
    int accuracy(){
        return 3;}
    Integer requires_daring(){
        return 5;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_ROGUE);}
}

class I_E_Dark_elf_sword_right extends Big_sharp_weapon {
	private static final long serialVersionUID = 2324909404077735325L;
	String name(){
        return "Dark Elven Sword (right)";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 5;}
    int speed(){
        return 1;}
    int accuracy(){
        return 2;}
    Integer requires_daring(){
        return 5;}
    Integer requires_skill(){
        return 5;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_ROGUE,Class_code.C_WARRIOR);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RIPOSTE);}
    String other_comments(){
		return "It gives you the 'Riposte' skill, allowing you to block a melee attack and counter-attack immediately.";
    }
    Integer cost(){
    	return 99999;}
}

class I_E_Dark_elf_sword_left extends Offhand_weapon {
	private static final long serialVersionUID = 3348581530714933839L;
	String name(){
        return "Dark Elven Sword (left)";}
    int speed(){
        return 2;}
    int accuracy(){
        return 1;}
    int evasion(){
        return 1;}
    Integer requires_daring(){
        return 5;}
    Integer requires_skill(){
        return 5;}
    Integer cost(){
    	return 99999;}
}

class I_E_Champions_sword extends Two_handed_sharp_weapon {
    private static final long serialVersionUID = -2338713301150890069L;
	String name(){
        return "Champion's sword";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 8;}
    int speed(){
        return 1;}
    int accuracy(){
        return 2;}
    Integer requires_skill(){
        return 5;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_LEADER);}
    String other_comments(){
		return "It gives you the 'Leader' skill, providing +1 melee attack speed if you are in the middle of the front row.";
    }
}

class I_E_Flaming_sword extends Big_sharp_weapon {
	private static final long serialVersionUID = 7346338923789683309L;
	String name(){
        return "Flaming sword";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 9;}
    int speed(){
        return 1;}
    int accuracy(){
        return 1;}
    Integer requires_skill(){
        return 4;}
    Integer requires_daring(){
        return 5;}
    int aggro(){
    	return 1;}
    boolean fire_melee(){
        return true;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_LIGHT);}
    String other_comments(){
		return "It can burn away shadows.";
    }
}

class I_E_Dragons_bane extends Big_sharp_weapon {
    private static final long serialVersionUID = 8003829784184810158L;
	String name(){
        return "Dragon's bane sword";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 6;}
    int speed(){
        return 1;}
    int accuracy(){
        return 2;}
    Integer requires_skill(){
        return 4;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_DRAGON_SLAYER,Character_action_code.CA_FIRE_RESISTANCE);}
    String other_comments(){
		return "It does extra damage against dragons, and protects you from fire.";
    }
 }

class I_E_Draining_sword extends Two_handed_sharp_weapon {
	private static final long serialVersionUID = 5445800772501412330L;
	String name(){
        return "Doomed blade";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 8;}
    int speed(){
        return 2;}
    Integer requires_skill(){
        return 4;}
    Integer requires_strength(){
        return 5;}
    int aggro(){
    	return 2;}
    boolean lose_health(){
		return true;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_CLEAVE,Character_action_code.CA_AGGRESSIVE,Character_action_code.CA_RAGE,Character_action_code.CA_LIFE_LEECH);}
    String other_comments(){
		return "It allows you to Cleave your enemies, and makes you fight aggressively. You gain bar whenever you are hit, and can use 'Life Leeching'. However, you constantly lose health over time.";
    }
 }

class I_E_Spear extends Big_sharp_weapon {
    private static final long serialVersionUID = -6944433291333902408L;
	String name(){
        return "Spear";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 12;}
    Integer cost(){
    	return 10;}
}

class I_E_Staff extends Melee_weapon {
    private static final long serialVersionUID = -7705688785004365182L;
	String name(){
        return "Staff";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int accuracy(){
        return -1;}
    boolean two_handed(){
    	return true;}
    Integer cost(){
    	return 10;}
}

class I_E_War_Staff extends Melee_weapon {
	private static final long serialVersionUID = -8888620000848032237L;
	String name(){
        return "Whirling staff";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int accuracy(){
        return 2;}
    int evasion(){
        return 3;}
    boolean two_handed(){
    	return true;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    int requires_constitution(){
        return 2;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_BLOCK);}
}


class I_E_Gnarled_staff extends Melee_weapon {
    private static final long serialVersionUID = -3096485013572202867L;
	String name(){
        return "Gnarled staff";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int power(){
        return 1;}
    int accuracy(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    boolean two_handed(){
    	return true;}
}

class I_E_White_staff extends Melee_weapon {
	private static final long serialVersionUID = -8674662465499440332L;
	String name(){
        return "Staff of White Magic";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int aim(){
    	return 2;}
    int evasion(){
    	return 2;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_HEALING,Character_action_code.CA_COUNTER_DRAINING,Character_action_code.CA_LIGHT);}
    String other_comments(){
		return "It gives you the 'Cure Wounds', 'Counter: Draining' and 'Light' spells.";}
    boolean two_handed(){
    	return true;}
}

class I_E_Staff_of_pyromancy extends Melee_weapon {
    private static final long serialVersionUID = -4863980711070092167L;
	String name(){
        return "Staff of Pyromancy";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int power(){
    	return 1;}
    int accuracy(){
    	return 2;}
    int penetration(){
    	return 2;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_STICKY_FLAMES,Character_action_code.CA_FIREBOLT,Character_action_code.CA_FIRE_RESISTANCE);}
    String other_comments(){
		return "It gives you the 'Sticky Flames' and 'Firebolt' spells. It also halves the damage you take from fire attacks.";}
    boolean two_handed(){
    	return true;}
}

class I_E_Staff_of_vitality extends Melee_weapon {
    private static final long serialVersionUID = 1389550715658245315L;
	String name(){
        return "Staff of Vitality";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int evasion(){
    	return 2;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RETRENCH);}
    String other_comments(){
		return "It gives you the 'Retrench' ability.";}
    boolean two_handed(){
    	return true;}
}

class I_E_Warlock_sword extends Melee_weapon {
    private static final long serialVersionUID = 6719795929909708275L;
	String name(){
        return "Warlock Sword";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 7;}
    int accuracy(){
    	return 2;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_LIFE_LEECH);}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    String other_comments(){
		return "It allows your wizard to regain health by draining the life energy of enemies he slays in battle.";
    }
}

class I_E_Mace extends Big_blunt_weapon {
    private static final long serialVersionUID = -438351870186724309L;
	String name(){
        return "Mace";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 10;}
    Integer cost(){
    	return 30;}
}

class I_E_Dwarven_hammer extends I_E_Mace {
	private static final long serialVersionUID = 1841065438232586899L;
	String name(){
        return "Dwarven hammer";}
	int accuracy(){
		return 2;}
    Integer cost(){
    	return 99999;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_MORE_GEMS);}
    String other_comments(){
		return "It helps you find more gems in the dungeon.";
    }
}

class I_E_Maul extends Two_handed_blunt_weapon {
    private static final long serialVersionUID = -8589878945899545585L;
	String name(){
        return "Maul";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 14;}
    int speed(){
        return -3;}
    Integer requires_strength(){
        return 4;}
    Integer requires_valor(){
        return 4;}
    Integer cost(){
    	return 50;}
}

class I_E_Club extends Big_blunt_weapon {
    private static final long serialVersionUID = 6736558904928983355L;
	String name(){
        return "Club";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 6;}
    int accuracy(){
        return -2;}
    Integer cost(){
    	return 10;}
}

class I_E_Mace_of_chastisement extends Big_blunt_weapon {
    private static final long serialVersionUID = 5445657153742299880L;
	String name(){
        return "Mace of Chastisement";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 12;}
    int accuracy(){
    	return 2;}
    int valor(){
        return 1;}
    Integer requires_valor(){
        return 4;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_SMITE,Character_action_code.CA_ZEAL);}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
    String other_comments(){
		return "It gives you the 'Smite' and 'Zeal' skills.";
    }
}

class I_E_Dark_bishop_mace extends Big_blunt_weapon {
	private static final long serialVersionUID = 2397015498303326653L;
	String name(){
        return "Dark Bishop's Mace";}
    int accuracy(){
    	return 3;}
    int speed(){
    	return 2;}
    Integer requires_valor(){
        return 5;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_SMITE,Character_action_code.CA_SANCTUARY,Character_action_code.CA_CURSE);}
   String other_comments(){
		return "You took it from the evil Patriarch Xystul. It gives you the 'Smite', 'Sanctuary' and 'Curse' skills.";
    }
}

class I_E_Mace_of_disruption extends I_E_Mace_of_chastisement {
    private static final long serialVersionUID = 831810166536033839L;
	String name(){
        return "Mace of Disruption";}
    int valor(){
        return 0;}
    int accuracy(){
    	return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_UNDEAD_SLAYER, Character_action_code.CA_STUNNING_BLOW, Character_action_code.CA_RESIST_DRAINING);}
    String other_comments(){
		return "It gives you the 'Undead Slayer' skill, doing double base damage against undead, and the 'Stunning Blow' skill. It also protects you from life draining attacks.";
    }
}

class I_E_Dagger extends Melee_weapon {
    private static final long serialVersionUID = 4803101814066892244L;
	String name(){
        return "Dagger";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 8;}
    int speed(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_MAGE);}
    Integer cost(){
    	return 5;}
}

class I_E_Elven_knife extends Melee_weapon {
    private static final long serialVersionUID = 5436082619970470268L;
	String name(){
        return "Elven knife";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 9;}
    int rapidity(){
        return 1;}
    int speed(){
        return 2;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE);}
}

class I_E_Mage_knife extends Melee_weapon {
	private static final long serialVersionUID = 4702645019802028760L;
	String name(){
        return "Athame";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 10;}
    int accuracy(){
        return 2;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_BLOOD_MAGIC);}
    String other_comments(){
		return "It gives you the 'Blood Magic' skill, allowing you to gain energy when you self-harm.";
    }
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
}

class I_E_Krill extends Melee_weapon {
	private static final long serialVersionUID = -3869235046355896597L;
	String name(){
        return "Krill";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 15;}
    int accuracy(){
        return 4;}
    int stamina(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_FORCE_BRAND);}
    String other_comments(){
		return "This legendary dagger gives the Force Brand skill, allowing you to channel the power of your magic into your melee blows.";
    }
}

class I_E_Assassins_blade extends Melee_weapon {
    private static final long serialVersionUID = -7654553129360112243L;
	String name(){
        return "Assassin's blade";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 18;}
    int speed(){
        return 2;}
    int accuracy(){
        return 2;}
    boolean poison_melee(){
        return true;}
    int cunning(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_ROGUE);}
}

class I_E_Reliquary extends Melee_weapon {
    private static final long serialVersionUID = 7676634488575590473L;
	String name(){
        return "Holy Reliquary";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 3;}
    int wisdom(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
}

class I_E_Book_of_exorcism extends Melee_weapon {
	private static final long serialVersionUID = -2171746657137037130L;
	String name(){
        return "Book of Exorcism";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 4;}
    int wisdom(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_DISPEL_UNDEAD,Character_action_code.CA_DISPELL);}
    String other_comments(){
		return "It gives you the 'Dispel Undead' and 'Banish' abilities.";}
    boolean two_handed(){
        return true;}
}

class I_E_Book_of_praise extends Melee_weapon {
	private static final long serialVersionUID = 8687952361752587660L;
	String name(){
        return "Book of Praise";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 3;}
    int stamina(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_BLESSING,Character_action_code.CA_SANCTUARY);}
    String other_comments(){
		return "It gives you the 'Blessing' and 'Sanctuary' abilities.";}
    boolean two_handed(){
        return true;}
}

class I_E_Prentice_wand extends Wand {
    private static final long serialVersionUID = 564699727011386445L;
	String name(){
        return "Prentice wand";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 8;}
    Integer cost(){
    	return 30;}
}

class I_E_Alder_wand extends Wand {
    private static final long serialVersionUID = 4054400977180714294L;
	String name(){
        return "Alder wand";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 12;}
    int rapidity(){
        return 2;}
    Integer requires_subtlety(){
        return 3;}
    Integer cost(){
    	return 100;}
}

class I_E_Hazel_wand extends Wand {
    private static final long serialVersionUID = -1171831957476117225L;
	String name(){
        return "Hazel wand";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 12;}
    int aim(){
        return 2;}
    Integer requires_subtlety(){
        return 3;}
    Integer cost(){
    	return 100;}
}

class I_E_Willow_wand extends Wand {
    private static final long serialVersionUID = 4451133723539068637L;
	String name(){
        return "Willow wand";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 8;}
    int subtlety(){
        return 1;}
    Integer cost(){
    	return 100;}
}

class I_E_Yew_wand extends Wand {
    private static final long serialVersionUID = 4095638073363955435L;
	String name(){
        return "Yew wand";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 18;}
    int aim(){
        return 1;}
    boolean poison_missile(){
        return true;}
    Integer requires_subtlety(){
        return 4;}
    Integer cost(){
    	return 200;}
}

class I_E_Flint_wand extends Wand {
    private static final long serialVersionUID = -6336304794490566313L;
	String name(){
        return "Flint wand";}
    int base_damage_dice(){
        return 1;}
    int base_damage_sides(){
        return 18;}
    int rapidity(){
        return 1;}
    boolean fire_missile(){
        return true;}
    Integer requires_power(){
        return 4;}
    Integer cost(){
    	return 200;}
}

class I_E_Wand_of_prestidigitation extends Wand {
    private static final long serialVersionUID = 9141132950980924874L;
	String name(){
        return "Wand of Prestidigitation";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int rapidity(){
        return 2;}
    Integer requires_subtlety(){
        return 4;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_DISTRACTION,Character_action_code.CA_CONFUSION);}
    String other_comments(){
		return "It gives you the 'Distraction' skill, which can protect from many attacks, and the 'Confusion' spell.";}
}

class I_E_Wand_of_destruction extends Wand {
    private static final long serialVersionUID = 214567919813544638L;
	String name(){
        return "Wand of Destruction";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int aim(){
        return 2;}
    Integer requires_power(){
        return 4;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_POISON_CLOUD_2,Character_action_code.CA_MISSILE);}
    String other_comments(){
		return "It gives you the 'Explosive Cloud' and 'Magic Missile' spells.";}
}

class I_E_Wand_of_interdiction extends Wand {
    private static final long serialVersionUID = -2983406527444819089L;
	String name(){
        return "Wand of Interdiction";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 10;}
    Integer requires_subtlety(){
        return 4;}
    Integer requires_power(){
        return 4;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_DISPELL,Character_action_code.CA_DECONSTRUCT);}
    String other_comments(){
		return "It gives you the 'Dispell' and 'Deconstruct' spells.";}
}

class I_E_Shortbow extends Shooter {
    private static final long serialVersionUID = 2345408296237859585L;
	String name(){
        return "Shortbow";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 8;}
    int rapidity(){
        return 2;}
    int aim(){
        return 2;}
    Integer requires_daring(){
        return 3;}
    Integer requires_skill(){
        return 3;}
    boolean takes_arrows(){
        return true;}
    Integer cost(){
    	return 50;}
}

class I_E_Javelins extends Shooter {
    private static final long serialVersionUID = 8053873620708147112L;
	String name(){
        return "Bunch of javelins";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 4;}
    Integer cost(){
    	return 10;}
}

class I_E_Longbow extends Shooter {
    private static final long serialVersionUID = -3907014305704440408L;
	String name(){
        return "Longbow";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 6;}
    int rapidity(){
        return 1;}
    int aim(){
        return 1;}
    Integer requires_daring(){
        return 3;}
    Integer requires_skill(){
        return 3;}
    boolean takes_arrows(){
        return true;}
    Integer cost(){
    	return 70;}
}

class I_E_Dragon_horn_bow extends Shooter {
    private static final long serialVersionUID = -2383134922851342653L;
	String name(){
        return "Dragon horn bow";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 9;}
    int rapidity(){
        return 0;}
    int aim(){
        return 3;}
    Integer requires_daring(){
        return 5;}
    Integer requires_strength(){
        return 4;}
    boolean takes_arrows(){
        return true;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RUTHLESS);}
    String other_comments(){
		return "It gives you the 'Ruthless' ability, encouraging your character to pick off injured enemies without mercy.";}
}

class I_E_Unseelie_bow extends Shooter {
    private static final long serialVersionUID = 5310499342639966485L;
	String name(){
        return "Unseelie bow";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 9;}
    int rapidity(){
        return 3;}
    int aim(){
        return 3;}
    int cunning(){
        return 1;}
    Integer requires_daring(){
        return 4;}
    Integer requires_skill(){
        return 4;}
    boolean takes_arrows(){
        return true;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RUTHLESS);}
    String other_comments(){
		return "It gives you the 'Lucky Shot' ability.";}
}

class I_E_Elven_bow extends Shooter {
    private static final long serialVersionUID = 3735713600590990655L;
	String name(){
        return "Elven bow";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 6;}
    int rapidity(){
        return 1;}
    int aim(){
        return 3;}
    Integer requires_daring(){
        return 4;}
    Integer requires_skill(){
        return 4;}
    boolean takes_arrows(){
        return true;}
}

class I_E_Crossbow extends Shooter {
    private static final long serialVersionUID = -5347659646412995827L;
	String name(){
        return "Crossbow";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 8;}
    int rapidity(){
        return -2;}
    int aim(){
        return 2;}
    Integer requires_daring(){
        return 3;}
    Integer requires_skill(){
        return 3;}
    boolean takes_bolts(){
        return true;}
    Integer cost(){
    	return 80;}
}

class I_E_Gnomish_crossbow extends Shooter {
    private static final long serialVersionUID = -8263631681086417768L;
	String name(){
        return "Gnomish crossbow";}
    int base_damage_dice(){
        return 3;}
    int base_damage_sides(){
        return 8;}
    int rapidity(){
        return -2;}
    int aim(){
        return 4;}
    Integer requires_daring(){
        return 4;}
    Integer requires_skill(){
        return 4;}
    boolean takes_bolts(){
        return true;}
}

class I_E_Magic_sling extends Shooter {
	private static final long serialVersionUID = 4312881060015090499L;
	String name(){
        return "Magic sling";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 6;}
    int rapidity(){
        return 2;}
    int aim(){
        return 3;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_PRIEST);}
    boolean takes_stones(){
        return true;}
    Integer cost(){
    	return 99999;}
}

class I_E_Sling extends Shooter {
    private static final long serialVersionUID = -1504334976882429662L;
	String name(){
        return "Sling";}
    int base_damage_dice(){
        return 2;}
    int base_damage_sides(){
        return 6;}
    int rapidity(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_PRIEST);}
    boolean takes_stones(){
        return true;}
    Integer cost(){
    	return 20;}
}

class I_E_Whip extends Shield {
	private static final long serialVersionUID = 3006298345273220684L;
	String name(){
        return "Whip";}
    int evasion(){
        return 2;}
    int speed(){
        return -2;}
    int aggro(){
        return 1;}
    Integer cost(){
    	return 50;}
    int requires_level(){
    	return 4;}
    Integer requires_daring(){
    	return 4;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_ROGUE);}
}

class I_E_Buckler extends Shield {
    private static final long serialVersionUID = -2246312207978989015L;
	String name(){
        return "Buckler";}
    int evasion(){
        return 1;}
    Integer cost(){
    	return 20;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_ROGUE,Class_code.C_PRIEST);}
}

class I_E_Shield extends Shield {
    private static final long serialVersionUID = 8703690615637111980L;
	String name(){
        return "Shield";}
    int evasion(){
        return 2;}
    Integer cost(){
    	return 50;}
}

class I_E_Dwarven_shield extends Shield {
    private static final long serialVersionUID = -4752791827820759326L;
	String name(){
        return "Dwarven shield";}
    int evasion(){
        return 2;}
    int constitution(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR);}
    Integer requires_skill(){
        return 3;}
}

class I_E_Blazoned_shield extends Shield {
    private static final long serialVersionUID = -2305449087795607501L;
	String name(){
        return "Blazoned shield";}
    int evasion(){
        return 3;}
    int aggro(){
        return 1;}
    int speed(){
        return -1;}
    Integer requires_strength(){
        return 3;}
    Integer requires_valor(){
        return 3;}
    Integer cost(){
    	return 99999;}
}

class I_E_Tower_shield extends Shield {
    private static final long serialVersionUID = -3256380008280413878L;
	String name(){
        return "Tower shield";}
    int evasion(){
        return 4;}
    int speed(){
        return -1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR, Class_code.C_PRIEST);}
    Integer requires_strength(){
        return 4;}
    Integer requires_valor(){
        return 4;}
    Integer cost(){
    	return 150;}
}

class I_E_Shield_defense extends Shield {
	private static final long serialVersionUID = -3882626953333563053L;
	String name(){
        return "Shield of Excellent Defense";}
    int evasion(){
        return 1;}
    int speed(){
        return -1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR, Class_code.C_PRIEST);}
    Integer requires_skill(){
        return 5;}
    Integer requires_valor(){
        return 5;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_PHYSICAL_RESISTANCE);}
    String other_comments(){
		return "It is the shield of the hero Locris. Most useful for heavily armored warriors, it grants protection from physical attacks.";
    }
}

class I_E_Mirrored_shield extends Shield {
    private static final long serialVersionUID = 5369102183126476374L;
	String name(){
        return "Mirrored shield";}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_REFLECTION);}
    int accuracy(){
        return -1;}
    int aim(){
        return -1;}
    int evasion(){
        return 3;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR, Class_code.C_PRIEST);}
    Integer requires_skill(){
        return 4;}
    Integer requires_valor(){
        return 4;}
    Integer cost(){
    	return 99999;}
    String other_comments(){
		return "It gives you the 'Reflection' skill, which can defend against enemy bolt spells.";
    }
}

class I_E_Dirk extends Offhand_weapon {
    private static final long serialVersionUID = -331413134607318843L;
	String name(){
        return "Dirk";}
    int speed(){
        return 1;}
    Integer requires_daring(){
        return 3;}
    Integer requires_skill(){
        return 3;}
    Integer cost(){
    	return 20;}
}

class I_E_Main_gauche extends Offhand_weapon {
    private static final long serialVersionUID = 2592266040025557485L;
	String name(){
        return "Main gauche";}
    int speed(){
        return 2;}
    Integer requires_daring(){
        return 5;}
    Integer requires_skill(){
        return 5;}
    Integer cost(){
    	return 50;}
}

class I_E_Chalice extends Trinket {
	private static final long serialVersionUID = 1872877486017943396L;
	String name(){
        return "Holy Chalice";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST,Class_code.C_MAGE,Class_code.C_ROGUE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_CHALICE);}
    String main_function(){
    	return "It just looks like a little handmade clay cup, but there is something very special about it.";}
}

class I_E_Magic_carpet extends Trinket {
	private static final long serialVersionUID = 2760070321907709127L;
	String name(){
        return "Magic carpet";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST,Class_code.C_MAGE,Class_code.C_ROGUE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_FLY);}
    String main_function(){
    	return "It appears to be an Astrakhan, or is it Exminster? Anyway, you can guess what it does...";}
}

class I_E_Potion_belt extends Trinket {
    private static final long serialVersionUID = -6469006615959640616L;
	String name(){
        return "Potion belt";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST,Class_code.C_MAGE,Class_code.C_ROGUE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_APOTHECARY);}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_BELT;}
    String main_function(){
    	return "This belt has slots in it, allowing you to store potions so you can quickly pull them out when needed. It allows you to carry four potions instead of the normal three. Does not stack with the Apothecary ability.";}
}

class I_E_Medusa_girdle extends Trinket {
	private static final long serialVersionUID = -6574724079486094155L;
	String name(){
        return "Lesser Medusa's Girdle";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_MAGE,Class_code.C_ROGUE);}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_BELT;}
    int skill(){
        return 1;}
    int cunning(){
        return 1;}
    int subtlety(){
        return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_POISON_RESISTANCE,Character_action_code.CA_STEELY_GAZE);}
    String main_function(){
    	return "The snake priestess's belt protects you from poison and gaze attacks. It also gives +1 to your Skill, Cunning or Subtlety.";}
}

class I_E_Pearl_amulet extends Trinket {
    private static final long serialVersionUID = 8278364311987490524L;
	String name(){
        return "Pearl Amulet";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST,Class_code.C_MAGE,Class_code.C_ROGUE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RESIST_DRAINING);}
    String main_function(){
    	return "This magical amulet protects you from having your life energy drained.";}
}

class I_E_Pan_pipe extends Trinket {
    private static final long serialVersionUID = 4815585268790716183L;
	String name(){
        return "Pan pipe";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST,Class_code.C_ROGUE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_BEFRIEND_ANIMAL);}
    String main_function(){
    	return "The sound of these little pipes is charming to animals.";}
}

class I_E_Lucky_charm extends Trinket {
    private static final long serialVersionUID = 203703875387531257L;
	String name(){
        return "Lucky charm";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_MAGE,Class_code.C_ROGUE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_SAVING_THROW);}
    String main_function(){
    	return "It gives you the 'Saving Throw' ability, which can sometimes save you from attacks doing more than 20 points of damage.";}
}

class I_E_Holy_water_sprinkler extends Trinket {
    private static final long serialVersionUID = -8543259830490468789L;
	String name(){
        return "Holy water sprinkler";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_BLESSING);}
    String main_function(){
    	return "It allows you to bless your comrades before battle.";}
}

class I_E_Curse_skull extends Trinket {
    private static final long serialVersionUID = 8593070566602017093L;
	String name(){
        return "Curse skull";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_DEATH_SPELL);}
    String main_function(){
    	return "Blackened and grinning, it allows you to cast a death spell.";}
}

class I_E_Glowing_phial extends Trinket {
    private static final long serialVersionUID = -7671367821571899829L;
	String name(){
        return "Phial";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST,Class_code.C_MAGE,Class_code.C_ROGUE);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_LIGHT);}
    String main_function(){
    	return "It allows you to summon light when all around you is dark.";}
}

class I_E_Shining_icon extends Trinket {
    private static final long serialVersionUID = -2463356276681360005L;
	String name(){
        return "Shining icon";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RAY_OF_LIGHT);}
    String main_function(){
    	return "It allows you to cast the 'Ray of Light' spell, the bane of undead.";}
}

class I_E_Plumed_helm extends Trinket {
    private static final long serialVersionUID = -127532520233230700L;
	String name(){
        return "Gaudy plumed helm";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_HEADGEAR;}
    int aggro(){
        return 1;}
    String main_function(){
    	return "";
    }
    String other_comments(){
		return "It gives you +1 aggro, making monsters more likely to concentrate their attacks on you.";
    }
}

class I_E_Visored_helm extends Trinket {
    private static final long serialVersionUID = -7421522610552597088L;
	String name(){
        return "Visored helm";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST);}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_HEADGEAR;}
    int armor(){
        return 1;}
    int aim(){
        return -3;}
}

class I_E_Mirrored_helm extends Trinket {
    private static final long serialVersionUID = 1518546975962295565L;
	String name(){
        return "Mirrored helm";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_HEADGEAR;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR,Class_code.C_PRIEST);}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_STEELY_GAZE);}
    int armor(){
        return 1;}
    String other_comments(){
		return "It protects you from enemy gaze attacks.";
    }
}

class I_E_Chain_undervest extends Trinket {
    private static final long serialVersionUID = -5041985540500367182L;
	String name(){
        return "Chain under-vest";}
    int armor(){
        return 1;}
    int speed(){
        return -1;}
}

class I_E_Hooded_cloak extends Trinket {
    private static final long serialVersionUID = -8646340768209436674L;
	String name(){
        return "Hooded cloak";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_CLOAK;}
    int aggro(){
        return -1;}
    String main_function(){
    	return "";
    }
    String other_comments(){
		return "It gives you -1 aggro, making monsters less likely to concentrate their attacks on you.";
    }
 }

class I_E_Hunters_sash extends Trinket {
    private static final long serialVersionUID = -2224634666942251461L;
	String name(){
        return "Hunter's sash";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_BELT;}
    int reflexes(){
        return 1;}
}

class I_E_Elven_arrows extends Trinket {
    private static final long serialVersionUID = 3570947958258332980L;
	String name(){
        return "Elven arrows";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_ARROWS;}
    int aim(){
        return 1;}
    Integer requires_daring(){
        return 4;}
    Integer requires_skill(){
        return 4;}
}

class I_E_Poison_arrows extends Trinket {
    private static final long serialVersionUID = -1078147620287551374L;
	String name(){
        return "Poisoned arrows";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_ARROWS;}
    int penetration(){
        return 3;}
    boolean poison_missile(){
        return true;}
    Integer requires_daring(){
        return 4;}
    Integer requires_skill(){
        return 4;}
}

class I_E_Duellists_bracers extends Trinket {
    private static final long serialVersionUID = -8160728899193153913L;
	String name(){
        return "Duellist's bracers";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_BRACERS;}
    int rapidity(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    Integer requires_subtlety(){
        return 4;}
}

class I_E_Bracers_of_defense extends Trinket {
    private static final long serialVersionUID = -8956554238548084225L;
	String name(){
        return "Bracers of defense";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_BRACERS;}
    int armor(){
        return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_DEFLECT_MISSILE);}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
    Integer requires_subtlety(){
        return 4;}
    String other_comments(){
		return "It gives you the 'Deflect Missile' skill, which can defend against enemy arrows and other ranged attacks.";
    }
 }

class I_E_Treasure_map extends Trinket {
    private static final long serialVersionUID = -2420572814125500526L;
	String name(){
        return "Treasure map";}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_MORE_GOLD);}
    String other_comments(){
		return "It gives you the 'Looter' skill, which makes the party find more gold. This skill stacks across characters (but not on a single character).";
    }
}

class I_E_Unicorn_horn extends Trinket {
    private static final long serialVersionUID = -7938150539451044679L;
	String name(){
        return "Unicorn horn";}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_POISON_RESISTANCE);}
    String other_comments(){
		return "It gives you the 'Poison Resistance' ability.";
    }
}

class I_E_Belt_of_scalps extends Trinket {
    private static final long serialVersionUID = -6456839378604639723L;
	String name(){
        return "Belt of scalps";}
    int damage(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR);}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_BELT;}
    Integer requires_strength(){
        return 4;}
}

class I_E_Elven_boots extends Trinket {
    private static final long serialVersionUID = 5784053177524773906L;
	String name(){
        return "Elven boots";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_FOOTWEAR;}
    int evasion(){
        return 1;}
}

class I_E_Flask_of_elixir extends Trinket {
    private static final long serialVersionUID = -1359115985990937677L;
	String name(){
        return "Glowing crystal";}
    int stamina(){
        return 1;}
}

class I_E_Guerdon extends Trinket {
    private static final long serialVersionUID = -4196999816395910261L;
	String name(){
        return "Banner";}
    int skill(){
        return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_RESIST_FEAR);}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR);}
    String other_comments(){
		return "It makes you immune to fear.";
    }
}

class I_E_Ring_of_free_action extends Trinket {
    private static final long serialVersionUID = -119646009499684627L;
	String name(){
        return "Ring of Free Action";}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_FREE_ACTION);}
    String other_comments(){
		return "It makes you immune to paralysis.";
    }
 }

class I_E_Gauntlets_of_power extends Trinket {
	private static final long serialVersionUID = 3091940433422819609L;
	String name(){
        return "Gauntlets of Power";}
    int strength(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_WARRIOR);}
}

class I_E_Amulet_of_warding extends Trinket {
	private static final long serialVersionUID = -4085180969073965667L;
	String name(){
        return "Amulet of Warding";}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_REVEAL_DANGER);}
    String other_comments(){
		return "It gives you the 'Reveal Danger' ability, which can be used to protect yourself from traps.";
    }
 }

class I_E_Wizards_hat extends Trinket {
	private static final long serialVersionUID = 6378279013454156776L;
	String name(){
        return "Wizard's Hat";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_HEADGEAR;}
    int subtlety(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);}
}

class I_E_Bandanna extends Trinket {
	private static final long serialVersionUID = -7671034474253866115L;
	String name(){
        return "Black Bandanna";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_HEADGEAR;}
    int daring(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_ROGUE);}
}


class I_E_Crusaders_Cape extends Trinket {
	private static final long serialVersionUID = 2531906226319126505L;
	String name(){
        return "Crusader's Cape";}
    Trinket_type_code trinket_type(){
        return Trinket_type_code.TR_CLOAK;}
    int valor(){
        return 1;}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);}
}

class I_E_Protective_talisman extends Trinket {
	private static final long serialVersionUID = 2400293076313246234L;
	String name(){
        return "Protective Talisman";}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_LUCKY_ESCAPE);}
    String other_comments(){
		return "It gives you the 'Lucky Escape' ability, which can sometimes protect you from attacks doing between 10 and 20 damage.";
    }
 }

class Familiar extends Item {
	boolean is_offhand(){
        return true;
    }

    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_MAGE);
    }
}

class I_E_Familiar_cat extends Familiar {
	private static final long serialVersionUID = 2885586972146754674L;
	String name(){
        return "Cat Familiar";}
    int subtlety(){
        return 1;}
    Integer requires_subtlety(){
    	return 3;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_STEALTH,Character_action_code.CA_REVEAL_DANGER);}
    String other_comments(){
		return "It helps you to sneak through the dungeon, and can also spot traps in your path.";}
}

class I_E_Familiar_raven extends Familiar {
	private static final long serialVersionUID = 6661192012971186390L;
	String name(){
        return "Raven Familiar";}
    Integer requires_subtlety(){
    	return 3;}
    int aim(){
    	return 2;}
    int reflexes(){
    	return 1;}
}

class I_E_Familiar_imp extends Familiar {
	private static final long serialVersionUID = -7465043952661449887L;
	String name(){
        return "Imp Familiar";}
    Integer requires_power(){
    	return 4;}
    int aggro(){
        return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_POISON_CLOUD, Character_action_code.CA_FEAR, Character_action_code.CA_MOCKERY);}
    String other_comments(){
		return "It empowers you to cast the Poison Cloud and Fear spells, and can also mock your enemies when they take heavy damage.";}
}

class I_E_Familiar_gold_dragon extends Familiar {
	private static final long serialVersionUID = -2782733004255769073L;
	String name(){
        return "Baby Gold Dragon Familiar";}
    int stamina(){
        return 1;}
    int evasion(){
        return 2;}
    int aggro(){
        return 1;}
    Integer requires_power(){
    	return 5;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_STUN_RESISTANCE,Character_action_code.CA_RESIST_FIRE,Character_action_code.CA_MORE_GOLD,Character_action_code.CA_SHOCKWAVE);}
    String other_comments(){
		return "It confers resistance to fire and stunning, and can smell out gold. It also has a shock wave breath weapon that you can use at close range.";}
}

class I_E_Familiar_white_dragon extends Familiar {
	private static final long serialVersionUID = -6065853120972906309L;
	String name(){
        return "Baby White Dragon Familiar";}
    int aim(){
        return 2;}
    Integer requires_power(){
    	return 5;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_COLD_RESISTANCE,Character_action_code.CA_FROST_BOLT,Character_action_code.CA_ESCAPE);}
    String other_comments(){
		return "It confers resistance to cold, and has a cold breath weapon. It also has the power to teleport you away to a safe place";}
}

class I_E_Cloak_concealment extends Body_armor {
	private static final long serialVersionUID = -4423339897886138581L;
	String name(){
        return "Cloak of Concealment";}
    Integer requires_cunning(){
    	return 3;}
    Integer requires_subtlety(){
    	return 4;}
    int evasion(){
        return 1;}
    int aggro(){
        return -2;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_BURGLAR,Character_action_code.CA_AMBUSH);}
    String other_comments(){
		return "It gives you the 'Burglar' ability, which allows you to sneak as if your Cunning was one point higher, and the 'Ambush' ability, which allows you to launch a dangerous attack on monsters that have just appeared.";}
    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_ROGUE);
    }
}

class Holy_symbol extends Item {
	boolean is_offhand(){
        return true;
    }

    List<Class_code> class_codes(){
        return Arrays.asList(Class_code.C_PRIEST);
    }
}

class I_E_Holy_symbol_1 extends Holy_symbol {
	private static final long serialVersionUID = -1850164467376880096L;
	String name(){
        return "Holy Symbol";}
    int accuracy(){
        return 1;}
    int aim(){
        return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_LIGHT,Character_action_code.CA_RESIST_DRAINING);}
    String other_comments(){
		return "It gives you the 'Light' spell, which protects you from darkness magic, and it makes you immune to energy draining attacks.";}
}

class I_E_Holy_symbol_2 extends Holy_symbol {
	private static final long serialVersionUID = 3490827112342643157L;
	String name(){
        return "Mystic Symbol";}
    int speed(){
        return 1;}
    int damage(){
        return 1;}
    List<Character_action_code> action_codes(){
        return Arrays.asList(Character_action_code.CA_TURN_UNDEAD,Character_action_code.CA_CURE_FEAR);}
    String other_comments(){
		return "It gives you the 'Turn Undead' and 'Cure Fear' spells.";}
}
